home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-24 | 3.0 KB | 23 lines | [TEXT/MPS ] |
- (* The lexical analyzer for lexer definitions. Bootstrapped! *)
-
- {
- #open "syntax";;
- #open "grammar";;
- #open "scan_aux";;
- }
-
- rule main = parse
- [` ` `\010` `\013` `\009` ] +
- { main lexbuf }
- | "(*"
- { comment_depth := 1;
- comment lexbuf;
- main lexbuf }
- | ([`A`-`Z` `a`-`z`] | `_` [`A`-`Z` `a`-`z` `'` `0`-`9`])
- ( `_` ? [`A`-`Z` `a`-`z` `'` `0`-`9`] ) *
- { match get_lexeme lexbuf with
- "rule" -> Trule
- | "parse" -> Tparse
- | "and" -> Tand
- | "eof" -> Teof
-